home *** CD-ROM | disk | FTP | other *** search
/ X User Tools / X User Tools (O'Reilly and Associates)(1994).ISO / sun4c / archive / tcltk.z / tcltk / man / cat3 / WindowId.3 < prev   
Text File  |  1994-09-20  |  6KB  |  199 lines

  1.  
  2.  
  3.  
  4. Tk_WindowId(3)        Tk Library Procedures
  5.  
  6.  
  7.  
  8. _________________________________________________________________
  9.  
  10. NAME
  11.      Tk_WindowId,    Tk_Parent,    Tk_Display,    Tk_DisplayName,
  12.      Tk_ScreenNumber, Tk_Screen, Tk_X, Tk_Y, Tk_Width, Tk_Height,
  13.      Tk_Changes,   Tk_Attributes,   Tk_IsMapped,   Tk_IsTopLevel,
  14.      Tk_ReqWidth,      Tk_ReqHeight,      Tk_InternalBorderWidth,
  15.      Tk_Visual, Tk_Depth,  Tk_Colormap   -  retrieve  information
  16.      from Tk's local data structure
  17.  
  18. SYNOPSIS
  19.      #include <tk.h>
  20.  
  21.      Window
  22.      Tk_WindowId(_t_k_w_i_n)
  23.  
  24.      Tk_Window
  25.      Tk_Parent(_t_k_w_i_n)
  26.  
  27.      Display *
  28.      Tk_Display(_t_k_w_i_n)
  29.  
  30.      char *
  31.      Tk_DisplayName(_t_k_w_i_n)
  32.  
  33.      int
  34.      Tk_ScreenNumber(_t_k_w_i_n)
  35.  
  36.      Screen *
  37.      Tk_Screen(_t_k_w_i_n)
  38.  
  39.      int
  40.      Tk_X(_t_k_w_i_n)
  41.  
  42.      int
  43.      Tk_Y(_t_k_w_i_n)
  44.  
  45.      int
  46.      Tk_Width(_t_k_w_i_n)
  47.  
  48.      int
  49.      Tk_Height(_t_k_w_i_n)
  50.  
  51.      XWindowChanges *
  52.      Tk_Changes(_t_k_w_i_n)
  53.  
  54.      XSetWindowAttributes *
  55.      Tk_Attributes(_t_k_w_i_n)
  56.  
  57.      int
  58.      Tk_IsMapped(_t_k_w_i_n)
  59.  
  60.  
  61.  
  62.  
  63. Tk                                                              1
  64.  
  65.  
  66.  
  67.  
  68.  
  69.  
  70. Tk_WindowId(3)        Tk Library Procedures
  71.  
  72.  
  73.  
  74.      int                                                           |
  75.      Tk_IsTopLevel(_t_k_w_i_n)                                          |
  76.  
  77.      int
  78.      Tk_ReqWidth(_t_k_w_i_n)
  79.  
  80.      int
  81.      Tk_ReqHeight(_t_k_w_i_n)
  82.  
  83.      int
  84.      Tk_InternalBorderWidth(_t_k_w_i_n)
  85.  
  86.      Visual *                                                      |
  87.      Tk_Visual(_t_k_w_i_n)                                              |
  88.  
  89.      int                                                           |
  90.      Tk_Depth(_t_k_w_i_n)                                               |
  91.  
  92.      Colormap                                                      |
  93.      Tk_Colormap(_t_k_w_i_n)                                            |
  94.  
  95. ARGUMENTS
  96.      Tk_Window   _t_k_w_i_n   (in)      Token for window.
  97. _________________________________________________________________
  98.  
  99.  
  100. DESCRIPTION
  101.      Tk_WindowID and the other names listed above are all  macros
  102.      that return fields from Tk's local data structure for _t_k_w_i_n.
  103.      None of these  macros  requires  any  interaction  with  the
  104.      server;  it is safe to assume that all are fast.
  105.  
  106.      Tk_WindowId returns the X identifier for _t_k_w_i_n, or  NULL  if
  107.      no  X  window  has  been  created  for  _t_k_w_i_n  yet  (see the
  108.      Tk_CreateMainWindow manual entry for details).
  109.  
  110.      Tk_Parent returns Tk's  token  for  the  logical  parent  of
  111.      _t_k_w_i_n.   The  parent  is  the  token that was specified when
  112.      _t_k_w_i_n was created, or NULL for main windows.
  113.  
  114.      Tk_Display returns a pointer to the Xlib  display  structure
  115.      corresponding  to  _t_k_w_i_n.   Tk_DisplayName  returns an ASCII
  116.      string identifying _t_k_w_i_n's display.  Tk_ScreenNumber returns
  117.      the index of _t_k_w_i_n's screen among all the screens of _t_k_w_i_n's
  118.      display.  Tk_Screen returns a pointer to the Xlib  structure
  119.      corresponding to _t_k_w_i_n's screen.
  120.  
  121.      Tk_X, Tk_Y, Tk_Width, and Tk_Height return information about
  122.      _t_k_w_i_n'_s  location within its parent and its size.  The loca-
  123.      tion information refers to the upper-left pixel in the  win-
  124.      dow,  or  its  border if there is one.  The width and height
  125.      information refers to the interior size of the  window,  not
  126.  
  127.  
  128.  
  129. Tk                                                              2
  130.  
  131.  
  132.  
  133.  
  134.  
  135.  
  136. Tk_WindowId(3)        Tk Library Procedures
  137.  
  138.  
  139.  
  140.      including  any  border.   Tk_Changes  returns a pointer to a
  141.      structure containing all of the above information plus a few
  142.      other   fields.   Tk_Attributes  returns  a  pointer  to  an
  143.      XSetWindowAttributes structure describing all of the  attri-
  144.      butes  of  the  _t_k_w_i_n's  window,  such as background pixmap,
  145.      event mask, and so on (Tk keeps track of all  this  informa-
  146.      tion  as  it  is  changed  by the application).  Note: it is
  147.      essential  that  applications   use   Tk   procedures   like
  148.      Tk_ResizeWindow  instead of X procedures like XResizeWindow,
  149.      so that Tk can keep its data structures up-to-date.
  150.  
  151.      Tk_IsMapped returns a non-zero value if _t_k_w_i_n is mapped  and
  152.      zero if _t_k_w_i_n isn't mapped.
  153.  
  154.      Tk_IsTopLevel returns a non-zero value if _t_k_w_i_n  is  a  top-  |
  155.      level window (its X parent is the root window of the screen)  |
  156.      and zero if _t_k_w_i_n isn't a top-level window.
  157.  
  158.      Tk_ReqWidth and Tk_ReqHeight return  information  about  the
  159.      window's  requested  size.   These  values correspond to the
  160.      last call to Tk_GeometryRequest for _t_k_w_i_n.
  161.  
  162.      Tk_InternalBorderWidth returns the width of internal  border
  163.      that  has  been  requested  for  _t_k_w_i_n,  or 0 if no internal
  164.      border was requested.  The return value is simply  the  last
  165.      value passed to Tk_SetInternalBorder for _t_k_w_i_n.
  166.  
  167.      Tk_Visual,  Tk_Depth,  and  Tk_Colormap  return  information  |
  168.      about  the  visual  characteristics  of a window.  Tk_Visual  |
  169.      returns the visual type for the window, Tk_Depth returns the  |
  170.      number  of  bits  per  pixel,  and  Tk_Colormap  returns the  |
  171.      current colormap for the window.  The visual characteristics  |
  172.      are  normally set from the defaults for the window's screen,  |
  173.      but they may be overridden by calling Tk_SetWindowVisual.
  174.  
  175.  
  176. KEYWORDS
  177.      attributes,  colormap,  depth,  display,  height,   geometry
  178.      manager,  identifier,  mapped,  requested size, screen, top-
  179.      level, visual, width, window, x, y
  180.  
  181.  
  182.  
  183.  
  184.  
  185.  
  186.  
  187.  
  188.  
  189.  
  190.  
  191.  
  192.  
  193.  
  194.  
  195. Tk                                                              3
  196.  
  197.  
  198.  
  199.